package com.xiyi.shouxin.entity.admin.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.admin.SystemConfig;

public class SystemConfigMapper implements RowMapper<SystemConfig> {
    @Override
    @Nullable
    public SystemConfig mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        SystemConfig config = new SystemConfig();
        if (rs == null) {
            return config;
        }
        config.setId(rs.getLong("id"));
        config.setConfigName(rs.getString("config_name"));
        config.setConfigType(rs.getString("config_type"));
        config.setConfigValue(rs.getString("config_value"));
        config.setConfigBrief(rs.getString("config_brief"));
        return config;
    }
}
